import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_pong/utils/mixins/mixin_navigator.dart';
import 'package:go_pong/views/home/home_view.dart';
import 'package:go_pong/widgets/stack_text.dart';

class AboutView extends StatefulWidget {
  static const route = '/about';
  const AboutView({Key? key}) : super(key: key);

  @override
  _AboutViewState createState() => _AboutViewState();
}

class _AboutViewState extends State<AboutView> with MixinNavigator {
  @override
  void initState() {
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Stack(
          children: [
            StackText(
              textSize: 20.0,
              xPosition: 0.0,
              yPosition: -0.3,
              text: '弹珠对打是一款休闲小游戏',
            ),
            StackText(
              textSize: 15.0,
              xPosition: 0.0,
              yPosition: -0.1,
              text: '游戏中可移动下方白色弹珠板反弹弹珠进行比拼',
            ),
            StackText(
              textSize: 15.0,
              xPosition: 0.0,
              yPosition: 0,
              text: '游戏简单轻松又不失乐趣',
            ),
            StackText(
              textSize: 15.0,
              xPosition: 0.0,
              yPosition: 0.1,
              text: '是一款全龄段适配的休闲小游戏！',
            ),
            StackText(
              textSize: 20.0,
              xPosition: 0.0,
              yPosition: 0.7,
              text: '● 返回 ●',
              onTap: () => routePushReplaced(context, HomeView.route),
            ),
          ],
        ),
      ),
    );
  }
}
